﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace Avalonia.Exusiai.Editor.Models;

public class BTree: INotifyPropertyChanged
{
    public ObservableCollection<BTree>? SubTrees { get; set; }

    public event PropertyChangedEventHandler? PropertyChanged;
    public string Name
    {
        get => _name;
        set
        {
            _name = value;
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Name)));
        }
    }
    private string _name;

    public BTree(string name)
    {
        _name = name;
    }
    public BTree(string name, ObservableCollection<BTree> subTrees)
    {
        _name = name;
        SubTrees = subTrees;
    }
}